<template>
	<div class="manage_page fillcontain">
		<el-row style="height: 100%;">
			<el-col :span="3" style="min-height: 100%; background-color: #324057;">
				<el-menu :default-active="defaultActive" style="min-height: 100%;width: 100%;" background-color="#324057"
				 text-color="#bfcbd9" router>
					<el-menu-item index="dashboard"><i class="el-icon-menu"></i>首页</el-menu-item>
					<el-submenu index="2">
						<template slot="title"><i class="el-icon-document"></i>资产管理</template>
						<el-menu-item index="idc">机房</el-menu-item>
						<el-menu-item index="cabinet">机柜</el-menu-item>
						<el-menu-item index="equipment">设备</el-menu-item>
						<el-menu-item index="contract">合同</el-menu-item>
					</el-submenu>
					<el-submenu index="3">
						<template slot="title"><i class="el-icon-document"></i>服务管理</template>
						<el-menu-item index="service">服务</el-menu-item>
						<el-menu-item index="service_url">服务链接</el-menu-item>
						<el-menu-item index="wayneservice">wayne信息</el-menu-item>
						<el-menu-item index="wiki">知识库</el-menu-item>
					</el-submenu>
					<el-submenu index="4">
						<template slot="title"><i class="el-icon-document"></i>权限管理</template>
						<el-menu-item index="user">用户管理</el-menu-item>
					</el-submenu>
				</el-menu>
			</el-col>
			<el-col :span="21" style="height: 100%;overflow: auto;">
				<keep-alive>
					<router-view></router-view>
				</keep-alive>
			</el-col>
		</el-row>
	</div>
</template>

<script>
	export default {
		computed: {
			defaultActive: function() {
				// return "dashboard";
				return this.$route.path.replace('/', '');
			}
		},
		created() {
			this.$store.dispatch('setDeployTypeOptions');
			this.$store.dispatch('setDeploykubenetesnameoptions');
			this.$store.dispatch('setEquipmentInfoOptions');
			this.$store.dispatch('setIdcOptions');
			this.$store.dispatch('setEquipmentOptions');
			this.$store.dispatch('setoperationsystemTypeOptions');
			this.$store.dispatch('setipaddresslistOptions');
			this.$store.dispatch('setcabinetOptions');
			this.$store.dispatch('setContractStatusOptions');
		}
	}
</script>

<style lang="less" scoped>
	@import '../style/mixin';
</style>
